Japanese Patent Application Publication No. 2006-301328 discloses an image forming apparatus provided with toners of C (cyan), M (magenta), Y (yellow), and K (black) and configured to replace colors depending on consumption amounts of toners and residual amounts of toners. In the replacement of colors, the image forming apparatus determines a descending order of colors with respect to the respective residual amount of the toner. For example, when the toner residual amount descends in the order of C, Y, and M, the following color numbers are assigned with colors for designating the ascending order: C=color number 1, M=color number 3, and Y=color number 2. Next, the image forming apparatus determines a descending order of colors with respect to the ratio of respective consumption amounts of toners. For example, when the ratio of the consumption amount of C, M, Y, and K toner is CMYK (128, 50, 20, 0), the following numbers regarding ratio are assigned with colors for designating the descending order with respect to the ratio:number regarding ratio 1=C (128), number regarding ratio 2=M (50), and number regarding ratio 3=Y (20). The image forming apparatus replaces so that the color number matches the number regarding ratio for each color. That is, CMYK (128, 50, 20, 0) is replaced with CMYK (128, 20, 50, 0) in which the values of M and Y are mutually interchanged.